package com.itboye.ihomebank.key;

import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.itboye.ihomebank.R;
import com.itboye.ihomebank.adapter.SheBeiAdapter;
import com.itboye.ihomebank.base.BaseOtherActivity;
import com.itboye.ihomebank.bean.SheBeiBean;
import com.itboye.ihomebank.custom.XListView;
/**
 * 附近设备
 *
 */
public class ActivitySheBei extends BaseOtherActivity {
	ImageView close_icon;
	TextView add_shap_title_tv;
	
	XListView shebei_listview;
	
	SheBeiAdapter adapter;
	List<SheBeiBean> list=new ArrayList<SheBeiBean>();
	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.close_icon:
			finish();
			break;

		default:
			break;
		}

	}

	@Override
	protected int layout_id() {
		// TODO Auto-generated method stub
		return R.layout.activity_she_bei;
	}

	@Override
	protected void onInitController() {
		adapter=new SheBeiAdapter(this, list, R.layout.item_she_bei);
		shebei_listview.setAdapter(adapter);
		
		for (int i = 0; i < 3; i++) {
			SheBeiBean bean=new SheBeiBean();
			bean.setName("S202_EB470E"+"-"+i);
			list.add(bean);
		}
		adapter.notifyDataSetChanged();
	}

	@Override
	protected void onInit() {
		add_shap_title_tv.setText("附近设备");

	}

	@Override
	protected void onReadIntent(Bundle bundle) {
		// TODO Auto-generated method stub

	}

}
